rttest2fandomcom-20200214-history
RTFM
More About RTFM http://www.bestpractical.com/rtfm/ RTFM Installation Installation is a fairly straightforward process (this process assumes that you already have a fully functional instance of RT3 installed and that you are not upgrading a previous installation of RTFM) : cd /usr/local/src wget http://download.bestpractical.com/pub/rt/release/RTFM-2.4.1.tar.gz tar zxf RTFM-2.4.1.tar.gz cd RTFM-2.4.1 perl Makefile.PL make install make initdb Then edit your RT_SiteConfig (or RT_Config) to include this line: Set(@Plugins,qw(RT::FM)); Finally, restart your web server: /etc/init.d/httpd stop /etc/init.d/httpd start WikiText Custom Field for RTFM The following is my observation based on RTFM 2.0.4 and RT 3.4.0 - I posted this on the forum and received no responses so I am unsure if this is indeed a global issue or not. Please feel free to correct any of the below if you find your situation different. Hopefully this will reduce the amount of time for someone trying to format articles in RTFM. / Included in the custom fields is a type = wikitext that generally uses standard wiki formatting with some exceptions. Note that formatting rules in this full Wiki are NOT the same as the wikitext custom field in RTFM. If you paste text into the RTFM wikitext field it will be autoformatted with internal wikilinks on any word with multiple capital letters. There are many cases where you will want to disable this on a word by word or block basis. To disable creation of auto links enclose the word or section in tags. Simply putting an exclamation point in front of the word will not work here as in Kwiki. ThisWordShouldBeWikified ThisWordWillNotBeWikified One other non-standard behavior is with hyperlinks. The wiki formatter does not automatically recognize links like http://www.bestpractical.com/ or email addresses such as name@domain.com. You will have to enclose any external links in square brackets or enclose in the normal HTML anchor tags or they will be treated as regular text. *I Think 'The enclose brackets for external links' is Ok. If someone adding an external link here - he MUST know how to work on this wiki. We don't want anyone just visit this page and add his 'Blog' here to get a link. Someone have 'Admin' Status on this Wiki, Please format and my text here or somewhere in this wiki you think perfect. * Most other formatting conventions work as expected. (I have not found this to be the case, only the small subset listed in man Text::WikiFormat actually work. SG.) See KwikiFormattingRules for those conventions. Text::[[WikiFormat]] for a partial spec (on Debian Sarge at least). ---- Some stuff I've noticed (rt 3.4.1, rtfm 2.0.4). KwikiFormattingRules is useful as a starting point but I've found quite a few differences. bold bold /italic/ italic /'bold and italic'/ bold and italic Those are single quotes. Other ones I have been able to get to work, hopefully this will save some frustration. SG. = Heading = = Heading = Sub Heading Sub Heading Sub-sub Heading Sub-sub Heading Unnumbered Lists - Need to be spaced in 4 or more spaces (more than shown here) * List * Here * How about here Numbered Lists - I haven't gotten these to work exactly right, the Subitems both show as 1 in my RTFM but hopefully this will get others a little closer to the right answer. SG. 1. Item 1 2. Item 2 a. Subitem 1 b. Subitem 2 3. Item 3 Entering a URL use the [ ] http://wiki.bestpractical.com If you need [ or ] use html entities i.e. &# 91; and &# 93; — & nbsp; could also be useful. NB: these entities are purposely broken so that this wiki won't mess with them, remove the space after the & or the # to use. Custom Wiki Tags Kludge: Editing the %tags and format_line definitions in WikiFormat.pm allows for custom wiki tags. Some knowledge of perl regular expressions is necessary. I would much rather see this done within the RT source but hey it works. Here is an example for adding warning text with style: Add the following to the %tags declaration. warn => sub { "$_0" }, warn_tag => qr/!(.+?)!/, Add the following to the format_line definition. $text =~ s!$tags->{warn_tag}!$tags->{warn}->($1, $opts)!eg; Cory Oldford ---- Add a Format Toolbar to the Wikitext Custom Field (RT-2.65, RTFM-2.21) Wanted to integrate a toolbar to facilitate the wiki formatting to our users. EditCustomFieldWikitext Copy: /opt/rt3/share/html/Elements/EditCustomFieldWikitext to /opt/rt3/local/html/Elements/EditCustomFieldWikitext Edit: /opt/rt3/local/html/Elements/EditCustomFieldWikitext Add before "% while": % my $wiki_textarea_value = $NamePrefix .$CustomField->id .'-Values'; % my $wiki_format_toolbar = qq( % % % % % % % % % % % % % % ); % print $wiki_format_toolbar; Add in both "textarea" tags: Edit.html Copy: /opt/rt3/share/html/RTFM/Article/Edit.html to /opt/rt3/local/html/RTFM/Article/Edit.html Edit: /opt/rt3/local/html/RTFM/Article/Edit.html Add before "form": Edit: /path/to/perl/libraries/WikiFormat.pm Add the following to the %tags declaration: code_html_start => sub { " Code: $_0" }, code_html_end => sub { "$_0 " }, code_tag_start => qr/\%code\%(.*?)/, code_tag_end => qr/(.*?)\%\/code\%/, image_html_start => sub { " sub { "$_0\" alt=\"Uploaded Image\" border=\"0\" />" }, image_tag_start => qr/\%image\%(.*?)/, image_tag_end => qr/(.*?)\%\/image\%/, Add the following to the format_line definition: $text =~ s!$tags->{code_tag_start}!$tags->{code_html_start}->($1, $opts)!eg; $text =~ s!$tags->{code_tag_end}!$tags->{code_html_end}->($1, $opts)!eg; $text =~ s!$tags->{image_tag_start}!$tags->{image_html_start}->($1, $opts)!eg; $text =~ s!$tags->{image_tag_end}!$tags->{image_html_end}->($1, $opts)!eg; ---- Miguel A. Rivera RT 3.8.2 and RT-FM 2.4.1 * Use /opt/rt3/local/plugins/RT-FM/html/Elements/EditCustomFieldWikitext instead of /opt/rt3/local/html/Elements/EditCustomFieldWikitext * Edit /opt/rt3/local/plugins/RT-FM/html/RTFM/Article/Edit.html instead of /opt/rt3/local/html/RTFM/Article/Edit.html reaktor Enable Inline images and HTML in RTFM Articles Ubuntu 9.10 RT 3.8.4 / RTFM 2.4.2 * Edit this file: /usr/share/request-tracker3.8/html/Elements/ShowCustomFieldWikitext And comment out this line: % $content = $m->comp('/Elements/ScrubHTML', Content => $content); so now it looks like this: %# $content = $m->comp('/Elements/ScrubHTML', Content => $content); * Save that file, and then restart apache with sudo /etc/init.d/apache2 restart Rename RTFM keyword on all pages If you doesn't like the RTFM acronym, you can change it by something else rather quickly RenameRTFM ---- DanFarst tc3driver - removed spam